home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2005 November / WNnov2005.iso / Windows / Equipement / hMailServer / hMailServer-4.1-Build-136.exe / {app} / PHPWebAdmin / tools_backup.php < prev    next >
Encoding:
PHP Script  |  2005-04-05  |  19.5 KB  |  436 lines

  1. <?php
  2. /*
  3. ** $Id: tools_backup.php,v 1.6 2005/04/05 11:05:20 hmailserver Exp $
  4. **
  5. **    hMailServer - Web interface
  6. **
  7. **    File formatted using TAB size 4
  8. **
  9. **    Get hMailserver at http://www.hmailserver.com
  10. **
  11. **    Author: Steen Rab°l <srabol@mail.tele.dk>
  12. **    Copyright (c) 2004, Steen Rab°l <srabol@mail.tele.dk>
  13. **
  14. **  This program is free software; you can redistribute it and/or modify
  15. **  it under the terms of the GNU General Public License as published by
  16. **  the Free Software Foundation; either version 2 of the License, or
  17. **  (at your option) any later version.
  18. **
  19. **  You may not change or alter any portion of this comment or credits
  20. **  of supporting developers from this source code or any supporting
  21. **  source code which is considered copyrighted (c) material of the
  22. **  original comment or credit authors.
  23. **
  24. **  This program is distributed in the hope that it will be useful,
  25. **  but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27. **  GNU General Public License for more details.
  28. **
  29. **  You should have received a copy of the GNU General Public License
  30. **  along with this program; if not, write to the Free Software
  31. **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  32. **
  33. */
  34.  
  35. if (hmailGetAdminLevel() != 2)
  36.     hmailHackingAttemp();
  37.  
  38. require_once("include/minixml/minixml.inc.php");
  39. $function    = hmailGetVar("function");
  40.  
  41. if($function == "dobackup")
  42. {
  43.     $output    = array();
  44.     $dodomains                = hmailGetVar("dodomains","");
  45.     $doaccounts                = hmailGetVar("doaccounts","");
  46.     $doaliases                = hmailGetVar("doaliases","");
  47.     $dodistributionlists    = hmailGetVar("dodistributionlists","");
  48.     $dodistrecipients        = hmailGetVar("dodistrecipients","");
  49.     $dosettings                = hmailGetVar("dosettings","");
  50.     $filename                = hmailGetVar("filename","");
  51.     $dodownload                = hmailGetVar("dodownload","");
  52.     $xmlDoc                    = new MiniXMLDoc();
  53.     $xmlRoot                = &$xmlDoc->getRoot();
  54.     $xmlArray                = array();
  55.     $obDomains                = $obBaseApp->Domains();
  56.     $DomainCount            = $obDomains->Count();
  57.  
  58.     if($dodomains != "")
  59.     {
  60.         $output[] = array("log" => "Backing up domains");
  61.         $xmlDomainsRoot = &$xmlRoot->CreateChild("Domains");
  62.         $xmlDomainsRoot->attribute('count',$DomainCount);
  63.         for ($i = 1; $i <= $DomainCount; $i++)
  64.         {
  65.             $obDomain = $obBaseApp->Domains[$i-1];
  66.             $output[] = array("log" => "Backing up domain: " . $obDomain->Name);
  67.             $xmlDomainRoot = &$xmlDomainsRoot->CreateChild("Domain");
  68.             $xmlDomainRoot->attribute("id",intval($i));
  69.             $e = &$xmlDomainRoot->createChild("Name");
  70.             $e->text($obDomain->Name);
  71.             $e = &$xmlDomainRoot->createChild("Active");
  72.             $e->text(($obDomain->Active == true ? 1 : 0));
  73.             $e = &$xmlDomainRoot->createChild("Postmaster");
  74.             $e->text($obDomain->Postmaster);
  75.  
  76.             if($doaccounts != "")
  77.             {
  78.                 BackupAccounts($xmlDomainRoot,$obDomain);
  79.             } // end if accounts
  80.             if($doaliases != "")
  81.             {
  82.                 BackupDomainAliases($xmlDomainRoot,$obDomain);
  83.             } // end if aliases
  84.  
  85.             if($dodistributionlists != "")
  86.             {
  87.                 BackupDistributionLists($xmlDomainRoot,$obDomain,$dodistrecipients);
  88.             } // end if dodistributionlists
  89.         }
  90.     }
  91.  
  92.     if($dosettings !=="")
  93.     {
  94.         BackupSettings($xmlRoot,$obBaseApp);
  95.     }
  96.  
  97.     $xml = $xmlDoc->toString(1);
  98.     $hmailSmarty->assign("xml",htmlentities($xml));
  99.     $hmailSmarty->assign("output",$output);
  100.     $hmailSmarty->assign("pagecontent",$hmailSmarty->fetch('tools_backup_complete.tpl'));
  101. }
  102. else
  103. {
  104.     $hmailSmarty->assign("pagecontent", $hmailSmarty->fetch('tools_backup.tpl'));
  105. }
  106.  
  107. function BackupDomain($p_xmlroot,$p_domainid, $p_options)
  108. {
  109. }
  110.  
  111. function BackupDistributionListRecipients(&$p_xmlroot,&$p_distributionlist)
  112. {
  113.     global $hmailSmarty, $output;
  114.     $output[] = array("log" => "Backing up dlist recipients");
  115.     $obRecipients = $p_distributionlist->Recipients();
  116.     $rCount = $obRecipients->Count();
  117.     if($rCount)
  118.     {
  119.         $xmlroot_recipeients    = &$p_xmlroot->createChild("Recipients");
  120.         $xmlroot_recipeients->attribute("count",$rCount);
  121.         for ($i = 0; $i < $rCount; $i++)
  122.         {
  123.             $obRecipient = $obRecipients->Item($i);
  124.             $xmlroot_recipeient = &$xmlroot_recipeients->createChild("Recipient");
  125.             $xmlroot_recipeient->attribute("id",$i+1);
  126.             $xmlroot_recipeient_elm = &$xmlroot_recipeient->createChild("RecipientAddress");
  127.             $xmlroot_recipeient_elm->text($obRecipient->RecipientAddress);
  128.         }
  129.     }
  130. }
  131.  
  132. function BackupDistributionLists(&$p_xmlroot,&$p_domain,$p_recipients = true)
  133. {
  134.     global $hmailSmarty,$output;
  135.  
  136.     $output[]    = array("log" => "Backing up dlist distributionlists");
  137.     $obDistributionLists    = $p_domain->DistributionLists();
  138.     $Count        = $obDistributionLists->Count();
  139.     if($Count)
  140.     {
  141.         $xmlroot_distributionlists    = &$p_xmlroot->createChild("DistributionLists");
  142.         $xmlroot_distributionlists->attribute("count",$Count);
  143.         for ($i = 0; $i < $Count; $i++)
  144.         {
  145.             $obDistributionList = $obDistributionLists->Item($i);
  146.  
  147.             $xmlroot_distributionlist = &$xmlroot_distributionlists->createChild("DistributionList");
  148.             $xmlroot_distributionlist->attribute("id",($i+1));
  149.             $xmlroot_distributionlist_elm = &$xmlroot_distributionlist->createChild("Active");
  150.             $xmlroot_distributionlist_elm->text(($obDistributionList->Active ? "1" : "0"));
  151.             $xmlroot_distributionlist_elm = &$xmlroot_distributionlist->createChild("Address");
  152.             $xmlroot_distributionlist_elm->text($obDistributionList->Address);
  153.             $xmlroot_distributionlist_elm = &$xmlroot_distributionlist->createChild("RequireSMTPAuth");
  154.             $xmlroot_distributionlist_elm->text(($obDistributionList->RequireSMTPAuth ? "1" : "0"));
  155.             $xmlroot_distributionlist_elm = &$xmlroot_distributionlist->createChild("RequireSenderAddress");
  156.             $xmlroot_distributionlist_elm->text($obDistributionList->RequireSenderAddress);
  157.  
  158.             if($p_recipients != "")
  159.             {
  160.                 BackupDistributionListRecipients($xmlroot_distributionlist,$obDistributionList);
  161.             }
  162.         }
  163.     }
  164. }
  165.  
  166. function BackupDomainAliases(&$p_xmlroot,&$p_domain)
  167. {
  168.     global $output;
  169.  
  170.     $output[] = array("log" =>"Backing up aliases");
  171.     $obAliases    = $p_domain->Aliases();
  172.     $Count = $obAliases->Count();
  173.     if($Count)
  174.     {
  175.         $xmlroot_aliases = &$p_xmlroot->createChild("Aliases");
  176.         $xmlroot_aliases->attribute("count",$Count);
  177.         for ($i = 0; $i < $Count; $i++)
  178.         {
  179.             $obAlias = $obAliases->Item($i);
  180.  
  181.             $xmlroot_alias = &$xmlroot_aliases->createChild("Alias");
  182.             $xmlroot_alias->attribute("id",($i+1));
  183.             $xmlroot_aliases_elm = &$xmlroot_alias->createChild("Active");
  184.             $xmlroot_aliases_elm->text(($obAlias->Active == true ? 1 : 0));
  185.             $xmlroot_aliases_elm = &$xmlroot_alias->createChild("Name");
  186.             $xmlroot_aliases_elm->text($obAlias->Name);
  187.             $xmlroot_aliases_elm = &$xmlroot_alias->createChild("Type");
  188.             $xmlroot_aliases_elm->text(intval($obAlias->Type));
  189.             $xmlroot_aliases_elm = &$xmlroot_alias->createChild("Value");
  190.             $xmlroot_aliases_elm->text($obAlias->Value);
  191.         }
  192.     }
  193. }
  194.  
  195. function BackupAccounts(&$p_xmlroot,&$p_domain)
  196. {
  197.     global $output;
  198.  
  199.     $output[] = array("log" => "Backing up accounts");
  200.     $obAccounts    = $p_domain->Accounts();
  201.     $accountcount = $obAccounts->Count();
  202.     if($accountcount)
  203.     {
  204.         $xmlroot_Accounts = &$p_xmlroot->CreateChild("Accounts");
  205.         $xmlroot_Accounts->attribute("count",$accountcount);
  206.         for($i = 0; $i < $accountcount; $i++)
  207.         {
  208.             $obAccount = $obAccounts->Item($i);
  209.  
  210.             $output[] = array("log" => "Backing up account : " . $obAccount->Address);
  211.  
  212.             $xmlroot_Account = &$xmlroot_Accounts->CreateChild("Account");
  213.             $xmlroot_Account->attribute("id",$i+1);
  214.  
  215.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("Active");
  216.             $xmlroot_Account_elm->text(($obAccount->Active == true ? 1 : 0));
  217.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("ADDomain");
  218.             $xmlroot_Account_elm->text($obAccount->ADDomain);
  219.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("Address");
  220.             $xmlroot_Account_elm->text($obAccount->Address);
  221.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("IsAD");
  222.             $xmlroot_Account_elm->text(($obAccount->IsAD == true ? 1 : 0));
  223.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("Password");
  224.             $xmlroot_Account_elm->text($obAccount->Password);
  225.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("ADUserName");
  226.             $xmlroot_Account_elm->text($obAccount->ADUserName);
  227.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("MaxSize");
  228.             $xmlroot_Account_elm->text($obAccount->MaxSize);
  229.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("VacationMessageIsOn");
  230.             $xmlroot_Account_elm->text(($obAccount->VacationMessageIsOn == true ? 1 : 0));
  231.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("VacationSubject");
  232.             $xmlroot_Account_elm->text($obAccount->VacationSubject);
  233.             $xmlroot_Account_elm = &$xmlroot_Account->createChild("VacationMessage");
  234.             $xmlroot_Account_elm->text(htmlentities($obAccount->VacationMessage));
  235.         }
  236.     }
  237.     else
  238.     {
  239.         $output[] = array("log" => "No accounts to backup for domain : " . $p_domain->Name);
  240.     }
  241. }
  242.  
  243.  
  244. function BackupSettings(&$p_xmlroot,&$p_baseapp)
  245. {
  246.     global $output;
  247.     $output[]    = array("log" => "Backing up settings");
  248.     $obSettings        = $p_baseapp->Settings();
  249.     $xmlroot_settings = &$p_xmlroot->createChild("Settings");
  250.  
  251.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("POP3Port");
  252.     $xmlroot_settings_elm->text($obSettings->POP3Port);
  253.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPPort");
  254.     $xmlroot_settings_elm->text($obSettings->SMTPPort);
  255.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("MaxSMTPConnections");
  256.     $xmlroot_settings_elm->text($obSettings->MaxSMTPConnections);
  257.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("MaxPOP3Connections");
  258.     $xmlroot_settings_elm->text($obSettings->MaxPOP3Connections);
  259.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("MirrorEMailAddress");
  260.     $xmlroot_settings_elm->text($obSettings->MirrorEMailAddress);
  261.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("AllowSMTPAuthPlain");
  262.     $xmlroot_settings_elm->text($obSettings->AllowSMTPAuthPlain);
  263.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("DenyMailFromNull");
  264.     $xmlroot_settings_elm->text($obSettings->DenyMailFromNull);
  265.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("TarpitDelay");
  266.     $xmlroot_settings_elm->text($obSettings->TarpitDelay);
  267.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("TarpitCount");
  268.     $xmlroot_settings_elm->text($obSettings->TarpitCount);
  269.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPNoOfTries");
  270.     $xmlroot_settings_elm->text($obSettings->SMTPNoOfTries);
  271.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPMinutesBetweenTry");
  272.     $xmlroot_settings_elm->text($obSettings->SMTPMinutesBetweenTry);
  273.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("IMAPPort");
  274.     $xmlroot_settings_elm->text($obSettings->IMAPPort);
  275.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPRelayer");
  276.     $xmlroot_settings_elm->text($obSettings->SMTPRelayer);
  277.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("WelcomeSMTP");
  278.     $xmlroot_settings_elm->text($obSettings->WelcomeSMTP);
  279.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("WelcomePOP3");
  280.     $xmlroot_settings_elm->text($obSettings->WelcomePOP3);
  281.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("WelcomeIMAP");
  282.     $xmlroot_settings_elm->text($obSettings->WelcomeIMAP);
  283.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("ServiceSMTP");
  284.     $xmlroot_settings_elm->text($obSettings->ServiceSMTP);
  285.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("ServicePOP3");
  286.     $xmlroot_settings_elm->text($obSettings->ServicePOP3);
  287.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("ServiceIMAP");
  288.     $xmlroot_settings_elm->text($obSettings->ServiceIMAP);
  289.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("MaxDeliveryThreads");
  290.     $xmlroot_settings_elm->text($obSettings->MaxDeliveryThreads);
  291.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SendStatistics");
  292.     $xmlroot_settings_elm->text($obSettings->SendStatistics);
  293.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("HostName");
  294.     $xmlroot_settings_elm->text($obSettings->HostName);
  295.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPRelayerRequiresAuthentication");
  296.     $xmlroot_settings_elm->text($obSettings->SMTPRelayerRequiresAuthentication);
  297.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPRelayerUsername");
  298.     $xmlroot_settings_elm->text($obSettings->SMTPRelayerUsername);
  299.     $xmlroot_settings_elm    = &$xmlroot_settings->createChild("SMTPRelayerPort");
  300.     $xmlroot_settings_elm->text($obSettings->SMTPRelayerPort);
  301.  
  302.     // Routes
  303.     $obRoutes    = $obSettings->Routes();
  304.     if(is_object($obRoutes) && $obRoutes->Count())
  305.     {
  306.         $xmlroot_routes    = &$xmlroot_settings->createChild("Routes");
  307.         $xmlroot_routes->attribute("count",$obRoutes->Count());
  308.         $Count = $obRoutes->Count();
  309.         for ($i = 0; $i < $Count; $i++)
  310.         {
  311.             $obRoute = $obRoutes->Item($i);
  312.             if($obRoute)
  313.             {
  314.                 $xmlroot_route    = &$xmlroot_routes->createChild("Route");
  315.                 $xmlroot_route->attribute("id",$i +1);
  316.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("DomainName");
  317.                 $xmlroot_routes_elm->text($obRoute->DomainName);
  318.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("TargetSMTPHost");
  319.                 $xmlroot_routes_elm->text($obRoute->TargetSMTPHost);
  320.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("TargetSMTPPort");
  321.                 $xmlroot_routes_elm->text($obRoute->TargetSMTPPort);
  322.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("NumberOfTries");
  323.                 $xmlroot_routes_elm->text($obRoute->NumberOfTries);
  324.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("MinutesBetweenTry");
  325.                 $xmlroot_routes_elm->text($obRoute->MinutesBetweenTry);
  326.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("AllAddresses");
  327.                 $xmlroot_routes_elm->text($obRoute->AllAddresses);
  328.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("RelayerRequiresAuth");
  329.                 $xmlroot_routes_elm->text($obRoute->RelayerRequiresAuth);
  330.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("RelayerAuthUsername");
  331.                 $xmlroot_routes_elm->text($obRoute->RelayerAuthUsername);
  332.                 $xmlroot_routes_elm = &$xmlroot_route->createChild("TreatSecurityAsLocalDomain");
  333.                 $xmlroot_routes_elm->text($obRoute->TreatSecurityAsLocalDomain);
  334.  
  335.                 // Addresses
  336.                 $obAddresses = $obRoute->Addresses();
  337.                 if(is_object($obAddresses) && $obAddresses->Count())
  338.                 {
  339.                     $xmlroot_routeaddresses    = &$xmlroot_route->createChild("RouteAddresses");
  340.                     $xmlroot_routeaddresses->attribute("count",$obAddresses->Count());
  341.                     $aCount = $obAddresses->Count();
  342.                     for ($j = 0; $j < $aCount; $j++)
  343.                     {
  344.                         $obAddress = $obAddresses->Item($j);
  345.                         $xmlroot_routeaddress    = &$xmlroot_routeaddresses->createChild("RouteAddress");
  346.                         $xmlroot_routeaddress->attribute("id",$j+1);
  347.                         $xmlroot_routeaddress_elm    = &$xmlroot_routeaddress->createChild("Address");
  348.                         $xmlroot_routeaddress_elm->text($obAddress->Address);
  349.                     }
  350.                 }
  351.             }
  352.         }
  353.     }
  354.     // IP Ranges
  355.     $obSecurityRanges    = $obSettings->SecurityRanges();
  356.     if(is_object($obSecurityRanges) && $obSecurityRanges->Count())
  357.     {
  358.         $xmlroot_ranges    = &$xmlroot_settings->createChild("IPRanges");
  359.         $xmlroot_ranges->attribute("count",$obSecurityRanges->Count());
  360.         $Count = $obSecurityRanges->Count();
  361.         for ($i = 0; $i < $Count; $i++)
  362.         {
  363.             $obSecurityRange = $obSecurityRanges->Item($i);
  364.  
  365.             $xmlroot_range    = &$xmlroot_ranges->createChild("Range");
  366.             $xmlroot_range->attribute("id",$i+1);
  367.             $xmlroot_range_elm = &$xmlroot_range->createChild("LowerIP");
  368.             $xmlroot_range_elm->text($obSecurityRange->LowerIP);
  369.             $xmlroot_range_elm = &$xmlroot_range->createChild("UpperIP");
  370.             $xmlroot_range_elm->text($obSecurityRange->UpperIP());
  371.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowSMTPConnections");
  372.             $xmlroot_range_elm->text($obSecurityRange->AllowSMTPConnections);
  373.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowPOP3Connections");
  374.             $xmlroot_range_elm->text($obSecurityRange->AllowPOP3Connections);
  375.             $xmlroot_range_elm = &$xmlroot_range->createChild("Priority");
  376.             $xmlroot_range_elm->text($obSecurityRange->Priority);
  377.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowIMAPConnections");
  378.             $xmlroot_range_elm->text($obSecurityRange->AllowIMAPConnections);
  379.             $xmlroot_range_elm = &$xmlroot_range->createChild("Name");
  380.             $xmlroot_range_elm->text($obSecurityRange->Name);
  381.             $xmlroot_range_elm = &$xmlroot_range->createChild("RequireAuthForDeliveryToLocal");
  382.             $xmlroot_range_elm->text($obSecurityRange->RequireAuthForDeliveryToLocal);
  383.             $xmlroot_range_elm = &$xmlroot_range->createChild("RequireAuthForDeliveryToRemote");
  384.             $xmlroot_range_elm->text($obSecurityRange->RequireAuthForDeliveryToRemote);
  385.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowDeliveryFromLocalToLocal");
  386.             $xmlroot_range_elm->text($obSecurityRange->AllowDeliveryFromLocalToLocal);
  387.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowDeliveryFromLocalToRemote");
  388.             $xmlroot_range_elm->text($obSecurityRange->AllowDeliveryFromLocalToRemote);
  389.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowDeliveryFromRemoteToLocal");
  390.             $xmlroot_range_elm->text($obSecurityRange->AllowDeliveryFromRemoteToLocal);
  391.             $xmlroot_range_elm = &$xmlroot_range->createChild("AllowDeliveryFromRemoteToRemote");
  392.             $xmlroot_range_elm->text($obSecurityRange->AllowDeliveryFromRemoteToRemote);
  393.         }
  394.     }
  395.  
  396.     // Logging
  397.     $xmlroot_logging    = &$xmlroot_settings->createChild("Logging");
  398.     $obLogging    = $obSettings->Logging();
  399.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("Enabled");
  400.     $xmlroot_logging_elm->text($obLogging->Enabled);
  401.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogSMTP");
  402.     $xmlroot_logging_elm->text($obLogging->LogSMTP);
  403.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogPOP3");
  404.     $xmlroot_logging_elm->text($obLogging->LogPOP3);
  405.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogTCPIP");
  406.     $xmlroot_logging_elm->text($obLogging->LogTCPIP);
  407.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogApplication");
  408.     $xmlroot_logging_elm->text($obLogging->LogApplication);
  409.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("Device");
  410.     $xmlroot_logging_elm->text($obLogging->Device);
  411.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogFormat");
  412.     $xmlroot_logging_elm->text($obLogging->LogFormat);
  413.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogDebug");
  414.     $xmlroot_logging_elm->text($obLogging->LogDebug);
  415.     $xmlroot_logging_elm    = &$xmlroot_logging->createChild("LogIMAP");
  416.     $xmlroot_logging_elm->text($obLogging->LogIMAP);
  417.     //$xmlroot_logging_elm    = $xmlroot_logging->createChild("EnableIPCLogging");
  418.     //$xmlroot_logging_elm->text($obLogging->EnableIPCLogging);
  419.  
  420.     // Antivirus
  421.     $obAntivirus    = $obSettings->AntiVirus();
  422.     $xmlroot_antivirus    = &$xmlroot_settings->createChild("Antivirus");
  423.     $xmlroot_antivirus_elm    = &$xmlroot_antivirus->createChild("ClamWinEnabled");
  424.     $xmlroot_antivirus_elm->text($obAntivirus->ClamWinEnabled);
  425.     $xmlroot_antivirus_elm    = &$xmlroot_antivirus->createChild("ClamWinExecutable");
  426.     $xmlroot_antivirus_elm->text($obAntivirus->ClamWinExecutable);
  427.     $xmlroot_antivirus_elm    = &$xmlroot_antivirus->createChild("ClamWinDBFolder");
  428.     $xmlroot_antivirus_elm->text($obAntivirus->ClamWinDBFolder);
  429.     $xmlroot_antivirus_elm    = &$xmlroot_antivirus->createChild("Action");
  430.     $xmlroot_antivirus_elm->text($obAntivirus->Action);
  431.     $xmlroot_antivirus_elm    = &$xmlroot_antivirus->createChild("NotifyReceiver");
  432.     $xmlroot_antivirus_elm->text($obAntivirus->NotifyReceiver);
  433.     $xmlroot_antivirus_elm    = &$xmlroot_antivirus->createChild("NotifySender");
  434.     $xmlroot_antivirus_elm->text($obAntivirus->NotifySender);
  435. }
  436. ?>